package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;
import legumes.shared.domain.SellSession;

public class GetSellSessionCallback extends SequencableRPCCall<SellSession> {

	private SellSession sellSession;
	private long sellSessionDate;

	public GetSellSessionCallback(long sellSessionDate_) {
		sellSessionDate = sellSessionDate_;
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.getSellSession(sellSessionDate,
				this);
	}

	public void onSuccess(SellSession sellSession_) {
		sellSession = sellSession_;
		callNext();
	}

	public SellSession getSellSession() {
		return sellSession;
	}

}